FROM openjdk:8-jre-alpine

ADD simhei.ttf /usr/share/fonts/


#安装程序
RUN echo "http://mirrors.aliyun.com/alpine/v3.9/main" > /etc/apk/repositories \
    && echo "http://mirrors.aliyun.com/alpine/v3.9/community" >> /etc/apk/repositories \
    && apk update upgrade \
    && apk add --no-cache libc6-compat bash tzdata ttf-dejavu fontconfig tini linux-pam krb5 krb5-libs \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 \
    && echo "Asia/Shanghai" > /etc/timezone \
    && rm -rf /var/cache/apk/*

ENV APOLLO="-Dapollo.meta=http://192.168.8.6:8083"
ENV LANG="en_US.UTF-8"
ENV LANGUAGE="en"
ENV TZ="Asia/Shanghai"
ENV JVM_OPTS="-Xms1024m -Xmx1024m"
ENV HEAP_DUMP_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/work/logs/"


WORKDIR /work
COPY syn.txt /work/hiekn/dic/
COPY kgms.jar  /work/

ENTRYPOINT java ${APOLLO} ${JVM_OPTS} ${HEAP_DUMP_OPTS}  -jar /work/kgms.jar